<?php
include ('top.ajax.php');
$events=Search::searchEvents($_GET['q']);
$videos=Search::searchVideos($_GET['q']);
$products=Product::getProducts($_GET['q']);
$posts=Search::searchPosts($_GET['q']);
$vendors=Vendor::getVendorsAuto($_GET['q']);

if(sizeof($products)>0) {
	foreach($products as $product) {
			echo html_entity_decode($product['nom'])." \n";
	}
}
if(sizeof($vendors)>0) {
	foreach($vendors as $vendor) {
		echo html_entity_decode($vendor['nom'])." \n";
	}
}
if(sizeof($events)>0) {
	foreach($events as $event) {
			echo html_entity_decode($event['titre'])." \n";
	}
}
if(sizeof($videos)>0) {
	foreach($videos as $video) {
			echo html_entity_decode($video['titre'])." \n";
	}
}
if(sizeof($posts)>0) {
	foreach($posts as $post) {
			echo html_entity_decode($post['titre'])." \n";
	}
}

?>